package com.flink.hbase;

import java.io.Serializable;
import java.util.Objects;

/**
 * 维度数据模型
 * 用于存储从 JDBC 数据源读取的维度信息
 */
public class DimensionData implements Serializable {
    
    private String dimensionKey;
    private String dimensionValue;
    private String category;
    private Long updateTime;
    private Boolean isActive;

    public DimensionData() {
    }

    public DimensionData(String dimensionKey, String dimensionValue, String category, Long updateTime, Boolean isActive) {
        this.dimensionKey = dimensionKey;
        this.dimensionValue = dimensionValue;
        this.category = category;
        this.updateTime = updateTime;
        this.isActive = isActive;
    }

    // Getters and Setters
    public String getDimensionKey() {
        return dimensionKey;
    }

    public void setDimensionKey(String dimensionKey) {
        this.dimensionKey = dimensionKey;
    }

    public String getDimensionValue() {
        return dimensionValue;
    }

    public void setDimensionValue(String dimensionValue) {
        this.dimensionValue = dimensionValue;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Boolean getIsActive() {
        return isActive;
    }

    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DimensionData that = (DimensionData) o;
        return Objects.equals(dimensionKey, that.dimensionKey) &&
               Objects.equals(dimensionValue, that.dimensionValue) &&
               Objects.equals(category, that.category) &&
               Objects.equals(updateTime, that.updateTime) &&
               Objects.equals(isActive, that.isActive);
    }

    @Override
    public int hashCode() {
        return Objects.hash(dimensionKey, dimensionValue, category, updateTime, isActive);
    }

    @Override
    public String toString() {
        return "DimensionData{" +
               "dimensionKey='" + dimensionKey + '\'' +
               ", dimensionValue='" + dimensionValue + '\'' +
               ", category='" + category + '\'' +
               ", updateTime=" + updateTime +
               ", isActive=" + isActive +
               '}';
    }
} 